@extends('layout.admin')

@section('title', '权限管理')

@section('content')
    <style>
        .edit-content{
            background-color: #fff;
            max-width: 100%;
            flex: 0 0 100%;
            padding: 0 10px;
        }

        .edit-content .edit-form{
            padding: 18px;
        }

    </style>
    <div class="edit-content">
        @include('shared.adminAddHeader', [
        'addHeaderName' => '新增角色',
        'svgIconName' => 'person-lines-fill',
        'addBackUrl' => url('admin/role/index'),
        'addSaveUrl' => url('admin/role/saveRole'),
    ])

        <div class="edit-form">
            <form id="editForm">
                @if(isset($editObject->id))
                    <input type="hidden" name="id" value="{{$editObject->id}}">
                @endif
                <div class="form-group row">
                    <label for="name" class="col-sm-3 form-lable-title col-form-label"><span class="text-danger">*</span>角色名称：</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="name" name="name" required
                        @if(isset($editObject->name)) value="{{$editObject->name}}" @else value="" @endif placeholder="请输入角色名称">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 form-lable-title col-form-label"><span class="text-danger">*</span>角色状态：</label>
                    <div class="col-sm-9">
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="status" id="status0"
                                   checked value="0">
                            <label class="form-check-label" for="status0">禁用</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="status" id="status1"
                                   @if(isset($editObject->status['value']) && (1 == $editObject->status['value'])) checked @endif value="1">
                            <label class="form-check-label" for="status1">启用</label>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>

@endsection
